Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODPart


ReadPartInfo

The ReadPartInfo method should read the part info data for a display frame of this part from the specified storage-unit view object.

ODInfoType ReadPartInfo (
                     in ODFrame frame,
                     in ODStorageUnitView storageUnitView);
frame
A reference to a display frame for this part.
storageUnitView
A reference to a storage-unit view object that is focused to the frame's part info property, but not to any value within that property.
return value
The information stored in the frame's part info.
DISCUSSION
When a document is reopened, OpenDoc may ask this part to read a display frame's part info data from a particular storage unit back into memory. OpenDoc calls this method when it reads in the part info data for a display frame of this part.

Your part's ReadPartInfo method should get the storage unit associated with the specified storage-unit view and focus it to the value(s) in the frame's part info property as necessary to read in the formats it needs.

Your part's ReadPartInfo method should read the data from the storage unit and place it in a block of memory, if necessary. (Your part must first allocate the block of memory.) In simple cases, part info data could be simple data, such as an integer, which does not require a block of memory. Your part's ReadPartInfo method should then return the memory block to the frame for storage so that your part can access it later.

OVERRIDING
When you subclass ODPart, you must override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.

EXCEPTIONS
kODErrInvalidFrame
The specified frame is not a display frame of this part.
kODErrOutOfMemory
There is not enough memory to allocate the part info data.
SEE ALSO
The ODInfoType type (page 883).
The ODPart::ClonePartInfo method (page 487).
The ODPart::WritePartInfo method (page 553).
"The ReadPartInfo Method" on page 107 in OpenDoc Cookbook.
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Reading and Writing Part Info" on page 302 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help